﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TireService.Data
{
    public class InvoiceBLL
    {
        // OUTDATED: 2012-10-28, not used anymore - taken over by E-conomic
        //public void UpdateInvoice(TireServiceDB db, Invoice invoice, Customer customer, int InvoiceId, DateTime InvoiceDate, DateTime DueDate, int InvoiceStatusId, int CurrencyId, bool SubmitInTransaction)
        //{          
        //    try
        //    {
        //        // Create/Update existing invoice
        //        customer.Invoices.Add(invoice);
        //        invoice.InvoiceDate = InvoiceDate;
        //        invoice.DueDate = DueDate;
        //        invoice.InvoiceStatusId = InvoiceStatusId;
        //        invoice.CurrencyId = CurrencyId;

        //        // Create new invoice
        //        if (InvoiceId == 0)
        //        {
        //            db.AddInvoice(invoice);
        //        }

        //        // Check if invoice is being created/updated in other transaction
        //        if (!SubmitInTransaction)
        //        {
        //            // Submit changes to database
        //            db.SubmitChanges();
        //        }
        //    }
        //    catch (Exception ex)
        //    {


        //    }

        //}
    }
}
